//
//  FMDBManager.m
//  BaseProject
//
//  Created by 刘航宇 on 16/9/5.
//  Copyright © 2016年 15fen. All rights reserved.
//

#import "FMDBManager.h"

@interface FMDBManager ()
@property (nonatomic, strong) FMDatabase * fmdb;// 数据库对象
@property (nonatomic, strong) NSString * dataBasePath;// 数据库路径
@end


@implementation FMDBManager
+(instancetype)sharedManager
{
    static FMDBManager* manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manager = [[FMDBManager alloc]init];
        manager.fmdb = [FMDatabase databaseWithPath:manager.dataBasePath];
    });
    return manager;
}




- (NSString *)dataBasePath {
	if(_dataBasePath == nil) {
		_dataBasePath = [NSString stringWithFormat:@"%@/%@",homeFilePath,FMDBName];
	}
	return _dataBasePath;
}

@end
